home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 834 b | 41 lines | [TEXT/CWIE] |
- // DateObject.h
-
- #ifndef DateObject_h
- #define DateObject_h
-
- #ifndef ConstData_h
- #include "ConstData.h"
- #endif
- #ifndef Str_h
- #include "Str.h"
- #endif
-
- class DateObject
- {
- private:
- uint32 secondsFrom1904;
-
- static Handle Intl0Resource();
- static Handle Intl1Resource();
- static DateCacheRecord *MakeCache();
- static DateCacheRecord *Cache();
-
- public:
- DateObject() {}
- DateObject( ConstData text ) { operator=( text ); }
- DateObject( int64 seconds ) : secondsFrom1904( seconds ) {}
-
- static DateObject Now();
-
- void operator=( ConstData );
- void operator=( uint32 seconds ) { secondsFrom1904 = seconds; }
-
- uint32 SecondsFrom1904() const { return secondsFrom1904; }
-
- void WriteDate( String255& ) const;
- void WriteTime( String255& ) const;
- void WriteDateAndTime( String255& ) const;
- };
-
- #endif
-